package accs.model.mail;

import java.util.HashMap;
import java.util.List;
import java.util.Properties;

public class CachedMailSettingsFetcher extends MailSettingsFetcher {
	private HashMap<String,List<Properties>> map=new HashMap<String, List<Properties>>();
	
	public CachedMailSettingsFetcher() {
	}
	
	public List<Properties> fetchSettingsForAddress(String host) {
		List<Properties> result=map.get(host);
		
		if(result==null) {
			result=super.fetchSettingsForAddress(host);
			map.put(host,result);
		}
		
		return result;
	}
}